CS	:= $(wildcard *.cpp)

CC		= g++
INCPATH	= ../include
#CCFLAG	= -I $(INCPATH) -c -g -O3 -static
CCFLAG	= -I $(INCPATH) -c -g -static

#UTILS_OBJS = UTIL.o SYSCALL.o GLOBAL.o MemoryManager.o

#ENGINE_OBJS = VInst.o VBlockBuilder.o VBasicBlockBuilder.o TBlock.o TCache.o TraceManager.o ExecutionEngine.o

#TCACHE_OBJS = SimpleTCache.o

#MEMORY_IMAGE_OBJS = ELFMemoryImage.o

#REG_ALLOCATOR_OBJS = NextUseRegAllocator.o SimpleRegAllocator.o GlobalRegAllocator.o GraphRegAllocator.o 

#PROFILER_OBJS = Profiler.o VBlockAnalyzer.o CFG.o

POLY_OBJS = 1DSpace.o 2DSpace.o 3DSpace.o Polytope.o

LIBCROSSBIT_OBJS = $(POLY_OBJS) 

all: $(LIBCROSSBIT_OBJS)
	ar -r libpolytope.a *.o
	echo "done!"

$(LIBCROSSBIT_OBJS):%.o:%.cpp
	$(CC) $(CCFLAG) $? -o $@

clean:
	rm -rf *.o
	rm *.a
